package org.akomantoso.core.io.util.group;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.akomantoso.core.data.Inline;
import org.akomantoso.core.data.group.InlineElements;
import org.akomantoso.core.io.util.Instantiator;
import org.akomantoso.core.util.MapUtil;

/**
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 */
public final class InlineElementsGroup {

	private InlineElementsGroup() {
	}

	public static final Map<String, Instantiator<InlineElements>> MAP;
	
	static {
		Map<String, Instantiator<InlineElements>> temp = new HashMap<String, Instantiator<InlineElements>>();
		
		MapUtil.copy(ANheaderInlineGroup.MAP, temp);
		MapUtil.copy(ANtitleInlineGroup.MAP, temp);
		MapUtil.copy(ANinlineGroup.MAP, temp);
		MapUtil.copy(ANsemanticInlineGroup.MAP, temp);
		MapUtil.copy(AmendmentInlineGroup.MAP, temp);
		MapUtil.copy(HTMLinlineGroup.MAP, temp);
		
		// inline
		temp.put(Inline.ELEMENT, new Instantiator<InlineElements>() {
			public Inline instantiate() {
				return new Inline();
			}
		});

		
		MAP = Collections.unmodifiableMap(temp);

	}

}